/*
 * Copyright (c) 2018 by TangChenBeiJian Information Technology Co.Ltd.
 *           All rights reserved
 */

package org.cx.constant;

import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * class functional description
 *
 * @author Lin.Jianfei
 * @version 1.0.0
 * @since 2018-11-29
 */
public enum ServerCodeType {
    SYSTEM_ERROR(-99999, "系统错误，请联系管理员！"),
    USER_NOT_FOUND(-1, "账号不存在或没有登录权限"),
    USER_NOT_LOGIN(-2, "请先登录"),
    USER_PASSWORD_ERROR(-3, "输入的密码有误，请重新输入"),
    VALIDATE_CODE_ERROR(-4, "验证码错误"),
    VALIDATE_NOT_FOUND(-5, "验证码不能为空"),
    PARAM_ERROR(-6, "参数异常"),
    USER_ERROR(-7, "账号异常"),
    OPERATION_ERROR(-8, "操作失败"),
    NOT_LOGIN(-9, "用户没有登录"),
    SESSION_EXPIRATION(-10, "会话超时，请从活动入口重新进入吧！"),
    CHECK_NEW_PWD(-11,"两次输入的密码不一致"),
    USERPHONE_EMPTY(-12,"手机号不能为空"),

    ;

    private int code;
    private String message;


    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    ServerCodeType(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }


}